package site.shihuan.helpdesk.service.model.doc;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * knowledge.
 *
 * @author 周世焕
 * @Date 2021/3/13 16:21
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@Document(indexName = "knowledge",type = "_doc", shards = 1, replicas = 0)
public class EsKnowledge {

    @Id
    private String id;

    @Field(type = FieldType.Text, analyzer = "ik_smart")
    private String question;

    @Field(type = FieldType.Text, analyzer = "ik_smart")
    private String answer;

    @Field(type = FieldType.Long)
    private long created;

    @Field(type = FieldType.Keyword)
    private String tenantId;

    @Field(type = FieldType.Keyword)
    private String parentId;

}
